using Godot;
using System;
using Dictionary = Godot.Collections.Dictionary;
public class HopperBlockEntity : BlockEntity
{
    public int tick = 5;
    public Store store = new Store(5);

    public override Dictionary getDict()
    {
        Dictionary dict = new Dictionary();
        dict.Add("store", store.getDict());
        dict.Add("tick", tick);
        return dict;
    }
    public override BlockEntity JsonTo(Dictionary dict)
    {
        if (dict.Contains("store")) this.store.JsonTo((Dictionary)dict["store"]);
        tick = dict["tick"].ToInt();
        return this;
    }
    public override String toJson()
    {
        return JSON.Print(getDict());
    }
    public override Store GetStore()
    {
        return store;
    }
}